Foreground extraction is one of the basic building blocks of computerized vision and automatic video surveillance systems. Generally, most object detection techniques are based, at their early stages, on identifying which of the image's pixels are associated with the background and which pixels are to be further processed as being associated with foreground objects.
Typical techniques for foreground extraction from an image or image stream are based on background subtraction. To this end, a background model is typically utilized; the model is then subtracted from a currently processed frame/image to identify differences between the model and the image. More specifically, the background model is subtracted from the frame being processed, and for each pixel the so-determined difference is analyzed with respect to a specific threshold. For example, if the subtracted pixel value exceeds the threshold, the pixel is considered as foreground, otherwise the pixel is assumed as background related.
For example, U.S. Pat. No. 8,285,046 describes techniques for a computer vision engine to update both a background model and thresholds used to classify pixels as depicting scene foreground or background in response to detecting that a sudden illumination changes has occurred in a sequence of video frames. The threshold values may be used to specify how much a given pixel may differ from corresponding values in the background model before being classified as depicting foreground. When a sudden illumination change is detected, the values for pixels affected by sudden illumination change may be used to update the value in the background image to reflect the value for that pixel following the sudden illumination change as well as update the threshold for classifying that pixel as depicting foreground/background in subsequent frames of video.